package day10;

public class TestContract4 {
    public static void main(String[] args) {
        Teacher2 t1 = new Teacher2("guan", 18);
        Teacher2 t2 = new Teacher2("guan2", 18);

        System.out.println(t1.name + "	" + t1.age);
        System.out.println(t2.name + "	" + t2.age);
    }
}

class Person{
    String name;
    int age;
    public Person(String name, int age){
        this.name = name;
        this.age =  age;
    }
}

class Teacher2 extends Person{
    public Teacher2(String name, int age){
        super(name,age);
    }
}